//从键盘输入两个浮点数给变量x和y，计算并显示它们的和、差、积、商
//并利用强制类型转换将其转换为int后，计算x % y的值并输出显示
#include <stdio.h>
int main()
{
    float x,y;
    printf("x y: ");
    while(scanf("%f%f",&x,&y) == 2 && y >= 0.0 && y < 1.0)
        printf("illegal!\n");
    printf("x+y = %f+%f = %f\n", x, y, x + y);
    printf("x-y = %f-%f = %f\n", x, y, x - y);
    printf("x*y = %f*%f = %f\n", x, y, x * y);
    printf("x/y = %f*%f = %f\n", x, y, x / y);
    printf("(int)x%%(int)y = %d%%%d = %d\n",(int)x,(int)y,(int)x % (int)y);
    return 0;
}
